﻿using GenericHtml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WLFramework.Data;
using WLFramework.Json;

namespace SampleSite.admin.ajax.combox
{
    /// <summary>
    /// apps 的摘要说明
    /// </summary>
    public class apps : AjaxHttpHandler
    {
        public override void OnProcessRequest(HttpContext context)
        {
            using (PermissionContext db = new PermissionContext())
            {
                var query = from p in db.sys_Applications
                            where p.A_State==1
                            select new
                            {
                                id = p.A_ID,
                                text = p.A_CName
                            };

                context.Response.Write(JSON.Instance.ToJSON(query.ToList()));
            }
        }
    }
}